<!--

    Copyright (c) 2005, 2018 Oracle and/or its affiliates. All rights reserved.

    This program and the accompanying materials are made available under the
    terms of the Eclipse Public License v. 2.0, which is available at
    http://www.eclipse.org/legal/epl-2.0.

    This Source Code may also be made available under the following Secondary
    Licenses when the conditions for such availability set forth in the
    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
    version 2 with the GNU Classpath Exception, which is available at
    https://www.gnu.org/software/classpath/license.html.

    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

-->
<!-- Portions Copyright [2019] [Payara Foundation and/or its affiliates] -->

<p><a id="task-ejbgeneral" name="task-ejbgeneral"></a><a id="GHEJL00002" name="GHEJL00002"></a></p>

<h4><a id="sthref2" name="sthref2"></a><a id="sthref3" name="sthref3"></a>To Configure EJB Settings</h4>
<a name="BEGIN" id="BEGIN"></a>
<ol>
<li>
<p>In the navigation tree, select the Configuration node.</p>
</li>
<li>
<p>Select the EJB Container node.</p>
<p>The Enterprise Java Beans (EJB) page opens.</p>
</li>
<li>
<p>In the Session Store Location field, type a new value for the session store location.</p>
<p>This field specifies the directory where passivated stateful session beans and persisted SFSB checkpoint states are stored on the file system. The default value is <code>${com.sun.aas.instanceRoot}/session-store</code>.</p>
<p>Passivated beans are stateful session beans that have had their state written to a file on the file system. Passivated beans typically have been idle for a certain period of time, and are not currently being accessed by clients. Similarly, persisted SFSB checkpoint states are individual SFSBs that have had their state written to a file on the file system.</p>
<p>This setting is applicable to SFSB checkpoint states only if EJB container availability is disabled. To disable availability, see <a href="../../../ejb/en/help/task-ejbcontaineravailability.html">To Configure Availability Settings for the EJB Container</a>.</p>
</li>
<li>
<p>Select the Option B or Option C radio button to set the Commit Option.</p>
<p>The Commit Option specifies how the container caches passivated bean instances between transactions.</p>
<ul>
<li>
<p>If you select Option B (the default), the container caches a ready instance between transactions.</p>
</li>
<li>
<p>If you select Option C, the container does not cache a ready instance between transactions.</p>
</li>
</ul>
</li>
<li>
<p>In the Initial and Minimum Pool Size field, type the minimum number of beans to be maintained in the pool.</p>
<p>The default value is 0.</p>
</li>
<li>
<p>In the Maximum Pool Size field, type the maximum number of beans that the container can maintain in the pool at one time.</p>
<p>The default value is 32.</p>
</li>
<li>
<p>In the Pool Resize Quantity field, type the number of beans that will be removed from the pool if they are idle for more than the time specified in the Pool Idle Timeout field.</p>
<p>The value must be at least 0 and less than the Maximum Pool Size value. The default value is 8.</p>
</li>
<li>
<p>In the Pool Idle Timeout field, type the time, in seconds, that a bean in the pool can remain idle before it will be removed from the pool.</p>
<p>After this amount of time, the bean is destroyed. A value of 0 means that a bean can remain idle indefinitely. The default value is 600.</p>
</li>
<li>
<p>In the Max Cache Size field, type the maximum number of beans to be held in the cache.</p>
<p>Increase the maximum number of beans to cache to eliminate the overhead of bean creation and destruction. However, if the cache is increased, the server consumes more memory and resources. Be sure your operating environment is sufficient for your cache settings. A value of 0 indicates an unbounded cache. The default value is 512.</p>
</li>
<li>
<p>In the Cache Resize Quantity field, type the number of beans to passivate when the cache is full.</p>
<p>When the maximum number of cached beans is reached, the container removes a number of passivated beans from the backup store. This value also specifies the number of beans to be created if a request arrives when the pool has no available beans. The value must be greater than 1 and less than the Max Cache Size value. The default value is 32.</p>
</li>
<li>
<p>In the Removal Timeout field, type the number of seconds after which a passivated bean is removed from the session store.</p>
<p>A value of 0 specifies that the container does not remove inactive beans automatically. If the Removal Timeout value is less than or equal to the Cache Idle Timeout value, beans are removed immediately without being passivated. The default value is 5400.</p>
</li>
<li>
<p>From the Removal Selection Policy drop-down list, select the policy the container uses to remove stateful session beans from the cache.</p>
<p>The choices are as follows:</p>
<dl>
<dt>Not recently used (NRU)</dt>
<dd>
<p>(Default) Removes a bean that hasn't been used recently.</p>
</dd>
<dt>First in, first out (FIFO)</dt>
<dd>
<p>Removes the oldest bean in the cache.</p>
</dd>
<dt>Least recently used (LRU)</dt>
<dd>
<p>Removes the least recently accessed bean.</p>
</dd>
</dl>
</li>
<li>
<p>In the Cache Idle Timeout field, type the maximum number of seconds that a bean can remain idle in the cache.</p>
<p>After this amount of time, the container can passivate this bean. A value of 0 specifies that beans never become candidates for passivation. The default value is 600.</p>
</li>
<li>
<p>In the Additional Properties section, specify additional properties.</p>
<ul>
<li>
<p>To add a property, click the Add Property button. In the blank row that appears, type the property name in the Name field, and type the property value in the Value field.</p>
</li>
<li>
<p>To modify a property, edit that property's Value field.</p>
</li>
<li>
<p>To delete a property, select the checkbox to the left of the Name field of the property that you are deleting, then click the Delete Properties button.</p>
</li>
</ul>
</li>
<li>
<p>Click Save.</p>

<hr>
<p><b>Tip:</b></p>
<p>To return to the default settings, click the Load Defaults button, then click Save.</p>

<hr>

</li>
<li>
<p>Restart the Payara Server.</p>
</li>
</ol>
<a id="sthref4" name="sthref4"></a>
<h5>See Also</h5>
<ul>
<li>
<p><a href="../../../ejb/en/help/task-ejbmdbpoolsettings.html">To Configure MDB Pool Settings</a></p>
</li>
<li>
<p><a href="../../../ejb/en/help/task-ejbtimerservice.html">To Configure the EJB Timer Service</a></p>
</li>
<li>
<p><a href="../../../ejb/en/help/task-ejbcontaineravailability.html">To Configure Availability Settings for the EJB Container</a></p>
</li>
</ul>



<small>Copyright &#169; 2005, 2017, Oracle and/or its affiliates. All rights reserved. <a href="docinfo.html">Legal Notices</a></small>
